package com.huaxin.common.Entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @author lwjing
 * @date 2018/3/26
 * @Desc $desc$
 * Copyright HUAXIN DATA. All rights reserved.
 */
public class TaskRoutDTO extends BaseDTO {
    private TaskRout data;

    public TaskRout getData() {
        return data;
    }

    public class TaskRout {
        private List<CLatLng>     route;
        private List<StationInfo> stationMessage;

        public List<CLatLng> getRoute() {
            return route;
        }

        public List<StationInfo> getStationMessage() {
            return stationMessage;
        }
    }

    public class StationInfo implements Parcelable {
        private String address;
        private double lat;
        private double lng;
        private String name;
        private String stationCode;
        private long workTime;//工作有效时长
        private long signInTime;//签到时间
        private long signOutTime;//签退时间


        protected StationInfo(Parcel in) {
            address = in.readString();
            lat = in.readDouble();
            lng = in.readDouble();
            name = in.readString();
            stationCode = in.readString();
            workTime = in.readLong();
            signInTime = in.readLong();
            signOutTime = in.readLong();
        }

        public final Creator<StationInfo> CREATOR = new Creator<StationInfo>() {
            @Override
            public StationInfo createFromParcel(Parcel in) {
                return new StationInfo(in);
            }

            @Override
            public StationInfo[] newArray(int size) {
                return new StationInfo[size];
            }
        };

        public String getAddress() {
            return address;
        }

        public double getLat() {
            return lat;
        }

        public double getLng() {
            return lng;
        }

        public String getName() {
            return name;
        }

        public String getStationCode() {
            return stationCode;
        }

        public long getWorkTime() {
            return workTime;
        }

        public long getSignInTime() {
            return signInTime;
        }

        public long getSignOutTime() {
            return signOutTime;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel parcel, int i) {
            parcel.writeString(address);
            parcel.writeDouble(lat);
            parcel.writeDouble(lng);
            parcel.writeString(name);
            parcel.writeString(stationCode);
            parcel.writeLong(workTime);
            parcel.writeLong(signInTime);
            parcel.writeLong(signOutTime);
        }
    }
}
